package hk.linkcredit.walletservice.wallet.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 钱包流水表
 * </p>
 *
 * @author LinkCredit
 * @since 2022-06-10 15:18:10
 */
@Data
@Builder
@TableName("wallet_flow")
@ApiModel(value = "WalletFlow对象", description = "钱包流水表")
public class WalletFlow {

    @ApiModelProperty("ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("钱包账户号")
    @TableField("wallet_no")
    private String walletNo;

    @ApiModelProperty("客户号")
    @TableField("cust_no")
    private String custNo;

    @ApiModelProperty("变更类型")
    @TableField("change_type")
    private String changeType;

    @ApiModelProperty("资金类型")
    @TableField("funds_type")
    private String fundsType;

    @ApiModelProperty("钱包类型")
    @TableField("wallet_type")
    private String walletType;

    @ApiModelProperty("变动金额")
    @TableField("change_amount")
    private BigDecimal changeAmount;

    @ApiModelProperty("From")
    @TableField("`from_where`")
    private String fromWhere;

    @ApiModelProperty("To")
    @TableField("`to_dest`")
    private String toDest;

    @ApiModelProperty("关联钱包订单")
    @TableField("order_serial_no")
    private String orderSerialNo;

    @ApiModelProperty("关联借据")
    @TableField("loan_serial_no")
    private String loanSerialNo;

    @ApiModelProperty("三方交易流水号")
    @TableField("reference")
    private String reference;

    @ApiModelProperty("支付时间")
    @TableField("pay_time")
    private Date payTime;

    @ApiModelProperty("状态")
    @TableField("state")
    private String state;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("创建者")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("更新者")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty("消息id")
    @TableField(value = "msg_id")
    private String msgId;
}
